<template>
  <div>

  </div>
</template>

<script>
  export default {
    methods: {
      async getAuth() {
        const code = this.$route.query.code;
        if(code) {/**统一身份登录 */
          this.$store.dispatch("ssoLogin", code).then(() => {
            this.$router.push({ path: this.redirect || "/" }).catch(()=>{});
          }).catch(() => {
            window.close();
          });
        } else {
          /**正常登录 */
        }
      }
    },
    mounted() {
      this.getAuth();
    }
  }
</script>

<style lang="scss" scoped>

</style>